home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / CIncludes / CMCalibrator.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  2.9 KB  |  99 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        CMCalibrator.h
  3.  
  4.      Contains:    ColorSync Calibration API
  5.  
  6.      Version:    Technology:    ColorSync 2.5
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __CMCALIBRATOR__
  18. #define __CMCALIBRATOR__
  19.  
  20. #ifndef __CMAPPLICATION__
  21. #include <CMApplication.h>
  22. #endif
  23. #ifndef __DISPLAYS__
  24. #include <Displays.h>
  25. #endif
  26. #ifndef __ERRORS__
  27. #include <Errors.h>
  28. #endif
  29.  
  30.  
  31.  
  32. #if PRAGMA_ONCE
  33. #pragma once
  34. #endif
  35.  
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39.  
  40. #if PRAGMA_IMPORT
  41. #pragma import on
  42. #endif
  43.  
  44. #if PRAGMA_STRUCT_ALIGN
  45.     #pragma options align=mac68k
  46. #elif PRAGMA_STRUCT_PACKPUSH
  47.     #pragma pack(push, 2)
  48. #elif PRAGMA_STRUCT_PACK
  49.     #pragma pack(2)
  50. #endif
  51.  
  52. typedef CALLBACK_API( void , CalibrateEventProcPtr )(EventRecord *event);
  53. typedef STACK_UPP_TYPE(CalibrateEventProcPtr)                     CalibrateEventUPP;
  54.  
  55. struct CalibratorInfo {
  56.     AVIDType                         displayID;
  57.     CMProfileLocation                 profileLocation;
  58.     CalibrateEventUPP                 eventProc;
  59.     UInt32                             reserved;
  60.     UInt32                             flags;
  61.     Boolean                         isGood;
  62.     SInt8                             byteFiller;
  63. };
  64. typedef struct CalibratorInfo            CalibratorInfo;
  65. typedef CALLBACK_API( Boolean , CanCalibrateProcPtr )(AVIDType displayID);
  66. typedef CALLBACK_API( OSErr , CalibrateProcPtr )(CalibratorInfo *theInfo);
  67. typedef STACK_UPP_TYPE(CanCalibrateProcPtr)                     CanCalibrateUPP;
  68. typedef STACK_UPP_TYPE(CalibrateProcPtr)                         CalibrateUPP;
  69. enum { uppCalibrateEventProcInfo = 0x000000C0 };                 /* pascal no_return_value Func(4_bytes) */
  70. enum { uppCanCalibrateProcInfo = 0x000000D0 };                     /* pascal 1_byte Func(4_bytes) */
  71. enum { uppCalibrateProcInfo = 0x000000E0 };                     /* pascal 2_bytes Func(4_bytes) */
  72. #define NewCalibrateEventProc(userRoutine)                         (CalibrateEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCalibrateEventProcInfo, GetCurrentArchitecture())
  73. #define NewCanCalibrateProc(userRoutine)                         (CanCalibrateUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCanCalibrateProcInfo, GetCurrentArchitecture())
  74. #define NewCalibrateProc(userRoutine)                             (CalibrateUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCalibrateProcInfo, GetCurrentArchitecture())
  75. #define CallCalibrateEventProc(userRoutine, event)                 CALL_ONE_PARAMETER_UPP((userRoutine), uppCalibrateEventProcInfo, (event))
  76. #define CallCanCalibrateProc(userRoutine, displayID)             CALL_ONE_PARAMETER_UPP((userRoutine), uppCanCalibrateProcInfo, (displayID))
  77. #define CallCalibrateProc(userRoutine, theInfo)                 CALL_ONE_PARAMETER_UPP((userRoutine), uppCalibrateProcInfo, (theInfo))
  78.  
  79. #if PRAGMA_STRUCT_ALIGN
  80.     #pragma options align=reset
  81. #elif PRAGMA_STRUCT_PACKPUSH
  82.     #pragma pack(pop)
  83. #elif PRAGMA_STRUCT_PACK
  84.     #pragma pack()
  85. #endif
  86.  
  87. #ifdef PRAGMA_IMPORT_OFF
  88. #pragma import off
  89. #elif PRAGMA_IMPORT
  90. #pragma import reset
  91. #endif
  92.  
  93. #ifdef __cplusplus
  94. }
  95. #endif
  96.  
  97. #endif /* __CMCALIBRATOR__ */
  98.  
  99.